package com.lwg.vhr.mapper;

import com.lwg.vhr.model.Hr;
import com.lwg.vhr.model.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HrMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Hr record);

    int insertSelective(Hr record);

    Hr selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Hr record);

    int updateByPrimaryKey(Hr record);

    /**
     * 通过用户名查找用户
     */
    Hr loadUserByUsername(@Param("username") String username);

    List<Role> getRolesByHrId(Integer id);

    List<Hr> getAllHrs(@Param("hrid") Integer id,@Param("keywords") String keywords);

    List<Hr> getAllHrsExceptCurrentHr(Integer id);
}
